<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <div :style="{color:count===100 ?'red':'green',backgroundColor:iscolor?'#000':'#ddd'}">546321</div>
        <div :style="styleObj">测试对象style绑定</div>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        var app = new Vue({
            el: '#app',
            data: {
                count: 100,
                iscolor: true,
                styleObj: {
                    color: 'pink',
                    backgroundColor: '#ddd',
                    fontSize: '30px'
                }

            },
            methods: {

            }
        })
    </script>
</body>

</html>